]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensionDownloader: Replace deprecated Soup.SessionAsync
authorMichael Lass <bevan@bi-co.net>
Thu, 14 May 2020 18:40:57 +0000 (20:40 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Thu, 14 May 2020 19:43:56 +0000 (19:43 +0000)
Soup.SessionAsync by default sets timeout and idle_timeout to 0. This
causes connections to hang around in state CLOSE_WAIT forever after the
remote host has closed the connection.

To fix this, we could set timeout and idle_timeout manually. However,
Soup.SessionAsync is marked as deprecated anyway and should be replaced
by Soup.Session. Doing so also sets a default timeout of 60 seconds.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2774

js/ui/extensionDownloader.js

index 08ebc2fec994fcf37154f9d297c1d78e1b34ae50..90fc5a6161faef1341dbb75228afea0754fb5148 100644 (file)
@@ -238,7 +238,7 @@ class InstallExtensionDialog extends ModalDialog.ModalDialog {
 });
 
 function init() {
-    _httpSession = new Soup.SessionAsync({ ssl_use_system_ca_file: true });
+    _httpSession = new Soup.Session({ ssl_use_system_ca_file: true });
 
     // See: https://bugzilla.gnome.org/show_bug.cgi?id=655189 for context.
     // _httpSession.add_feature(new Soup.ProxyResolverDefault());